/*   1:    */ package org.jetbrains.debugger;
/*   2:    */ 
/*   3:    */

import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */ 
/*   9:    */ public abstract class BreakpointBase<L>
/*  10:    */   extends Breakpoint
/*  11:    */ {
/*  12:    */   protected int line;
/*  13:    */   protected final int column;
/*  14:    */   protected boolean enabled;
/*  15:    */   protected String condition;
/*  16:    */   protected final BreakpointTarget target;
/*  17: 19 */   protected final List<L> actualLocations = ContainerUtil.createLockFreeCopyOnWriteList();
/*  18:    */   protected volatile boolean dirty;
/*  19:    */   
/*  20:    */   protected BreakpointBase(@NotNull BreakpointTarget paramBreakpointTarget, int paramInt1, int paramInt2, @Nullable String paramString, boolean paramBoolean)
/*  21:    */   {
/*  22: 28 */     this.target = paramBreakpointTarget;
/*  23: 29 */     this.line = paramInt1;
/*  24: 30 */     this.column = paramInt2;
/*  25: 31 */     this.condition = paramString;
/*  26: 32 */     this.enabled = paramBoolean;
/*  27:    */   }
/*  28:    */   
/*  29:    */   public boolean isResolved()
/*  30:    */   {
/*  31: 37 */     return !this.actualLocations.isEmpty();
/*  32:    */   }
/*  33:    */   
/*  34:    */   @NotNull
/*  35:    */   public BreakpointTarget getTarget()
/*  36:    */   {
/*  37: 43 */     BreakpointTarget tmp4_1 = this.target;
/*  38: 43 */     if (tmp4_1 == null) {
/*  39: 43 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/debugger/BreakpointBase", "getTarget" }));
/*  40:    */     }
/*  41: 43 */     return tmp4_1;
/*  42:    */   }
/*  43:    */   
/*  44:    */   public int getLine()
/*  45:    */   {
/*  46: 48 */     return this.line;
/*  47:    */   }
/*  48:    */   
/*  49:    */   public int getColumn()
/*  50:    */   {
/*  51: 52 */     return this.column;
/*  52:    */   }
/*  53:    */   
/*  54:    */   @Nullable
/*  55:    */   public String getCondition()
/*  56:    */   {
/*  57: 58 */     return this.condition;
/*  58:    */   }
/*  59:    */   
/*  60:    */   public void setCondition(@Nullable String paramString)
/*  61:    */   {
/*  62: 63 */     if (StringUtil.equals(this.condition, paramString)) {
/*  63: 64 */       return;
/*  64:    */     }
/*  65: 66 */     this.condition = paramString;
/*  66: 67 */     this.dirty = true;
/*  67:    */   }
/*  68:    */   
/*  69:    */   public boolean isEnabled()
/*  70:    */   {
/*  71: 72 */     return this.enabled;
/*  72:    */   }
/*  73:    */   
/*  74:    */   public Breakpoint enabled(boolean paramBoolean)
/*  75:    */   {
/*  76: 77 */     if (paramBoolean == this.enabled) {
/*  77: 78 */       return this;
/*  78:    */     }
/*  79: 80 */     this.enabled = paramBoolean;
/*  80: 81 */     this.dirty = true;
/*  81: 82 */     return this;
/*  82:    */   }
/*  83:    */   
/*  84:    */   public List<L> getActualLocations()
/*  85:    */   {
/*  86: 86 */     return this.actualLocations;
/*  87:    */   }
/*  88:    */   
/*  89:    */   public void setActualLocations(@Nullable List<L> paramList)
/*  90:    */   {
/*  91: 90 */     this.actualLocations.clear();
/*  92: 91 */     if ((paramList != null) && (!paramList.isEmpty())) {
/*  93: 92 */       this.actualLocations.addAll(paramList);
/*  94:    */     }
/*  95:    */   }
/*  96:    */   
/*  97:    */   public abstract boolean isVmRegistered();
/*  98:    */   
/*  99:    */   public int hashCode()
/* 100:    */   {
/* 101:100 */     int i = this.line;
/* 102:101 */     i = 31 * i + this.column;
/* 103:102 */     i = 31 * i + (this.enabled ? 1 : 0);
/* 104:103 */     if (this.condition != null) {
/* 105:104 */       i = 31 * i + this.condition.hashCode();
/* 106:    */     }
/* 107:106 */     i = 31 * i + this.target.hashCode();
/* 108:107 */     return i;
/* 109:    */   }
/* 110:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.debugger.BreakpointBase

 * JD-Core Version:    0.7.0.1

 */